/**
 * Created with IntelliJ IDEA.
 * Description: 只出现一次的数字
 * Author:  LiuTao
 * Version: 1.0
 * Date:    2023-08-04  20:05
 */
public class Test6 {
    public static void main(String[] args) {
        int[] array = {1,2,3,2,1};
        System.out.println(find(array));
    }

    public static int find(int[] array) {
        int ret = 0;
        for (int i = 0; i < array.length; i++) {
            ret ^= array[i];
        }
        return ret;
    }
}
